class AlterUsers < ActiveRecord::Migration
  def self.up     
    remove_column(:users, :name, :password)
    add_column :users, :login,                     :string
    add_column :users, :email,                     :string
    add_column :users, :crypted_password,          :string, :limit => 40
    add_column :users, :salt,                      :string, :limit => 40
    add_column :users, :remember_token,                    :string
    add_column :users, :remember_token_expires_at,         :datetime
  end

  def self.down
    add_column :users, :name, :string, :null => false
    add_column :users, :password, :string
    remove_column(:users, :login, :email, :crypted_password, :salt, :remember_token, :remember_token_expires_at)
  end
end
